/ BBS in a Box 15
/ BBS in a box XV-2.iso / Files II / Prog / S / Simple Sockets 1.0.1.sit / Simple Sockets 1.0.1 ƒ / ip ƒ / ipdr.c ![]() | < prev | next > |
MacBinary | 1995-02-02 | 1.3 KB | [TEXT/MMCC] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
66% | dexvert | Compact Compressed (Unix) (archive/compact) | ext | Supported |
10% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
10% | dexvert | Jesper Olsen Module (music/jesperOlsen) | magic | Supported |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | MacBinary II, Thu Feb 2 19:28:45 1995, modified Thu Feb 2 19:28:45 1995, creator 'MMCC', type ASCII, 600 bytes "ipdr.c" , at 0x2d8 410 bytes resource | default (weak) | |
99% | file | data | default | |
49% | TrID | Macintosh plain text (MacBinary) | default | |
33% | TrID | TTComp archive compressed (bin-4K) | default (weak) | |
16% | TrID | MacBinary 2 | default (weak) | |
100% | siegfried | fmt/1762 MacBinary (II) | default | |
100% | lsar | MacBinary | default |
id metadata | |
---|---|
key | value |
macFileType | [TEXT] |
macFileCreator | [MMCC] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 69 70 64 72 2e 63 | 00 00 00 00 00 00 00 00 |..ipdr.c|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 02 58 00 | 00 01 9a ab 57 29 3d ab |......X.|....W)=.|
|00000060| 57 29 3d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |W)=.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 f6 15 00 00 |........|........|
|00000080| 2f 2a 0d 20 2a 20 69 70 | 64 72 2e 63 0d 20 2a 0d |/*. * ip|dr.c. *.|
|00000090| 20 2a 20 49 6e 74 65 72 | 6e 65 74 20 50 72 6f 74 | * Inter|net Prot|
|000000a0| 6f 63 6f 6c 20 44 61 74 | 61 20 52 65 70 72 65 73 |ocol Dat|a Repres|
|000000b0| 65 6e 74 61 74 69 6f 6e | 0d 20 2a 0d 20 2a 20 54 |entation|. *. * T|
|000000c0| 68 69 73 20 66 69 6c 65 | 20 73 68 6f 75 6c 64 20 |his file| should |
|000000d0| 72 65 6d 6f 76 65 20 73 | 6f 6d 65 20 6f 66 20 74 |remove s|ome of t|
|000000e0| 68 65 20 62 75 72 64 65 | 6e 20 66 72 6f 6d 20 69 |he burde|n from i|
|000000f0| 70 2e 63 0d 20 2a 0d 20 | 2a 20 4d 44 54 20 31 39 |p.c. *. |* MDT 19|
|00000100| 20 4a 41 4e 20 39 35 0d | 20 2a 2f 0d 0d 23 69 6e | JAN 95.| */..#in|
|00000110| 63 6c 75 64 65 20 22 69 | 70 64 72 2e 68 22 0d 0d |clude "i|pdr.h"..|
|00000120| 2f 2a 2a 0d 20 2a 2a 0d | 20 2a 2a 20 44 41 54 41 |/**. **.| ** DATA|
|00000130| 20 52 45 50 52 45 53 45 | 4e 54 41 54 49 4f 4e 0d | REPRESE|NTATION.|
|00000140| 20 2a 2a 0d 20 2a 2a 2f | 0d 0d 0d 2f 2a 20 68 74 | **. **/|.../* ht|
|00000150| 6f 6e 73 2c 20 6e 74 6f | 68 73 0d 20 2a 20 2d 20 |ons, nto|hs. * - |
|00000160| 63 6f 6e 76 65 72 74 20 | 73 68 6f 72 74 20 64 61 |convert |short da|
|00000170| 74 61 2d 74 79 70 65 73 | 20 66 72 6f 6d 20 68 6f |ta-types| from ho|
|00000180| 73 74 20 74 6f 20 6e 65 | 74 77 6f 72 6b 20 62 79 |st to ne|twork by|
|00000190| 74 65 20 6f 72 64 65 72 | 20 61 6e 64 20 76 69 63 |te order| and vic|
|000001a0| 65 20 76 65 72 73 61 2e | 0d 20 2a 2f 0d 0d 69 6e |e versa.|. */..in|
|000001b0| 74 20 68 74 6f 6e 73 28 | 69 6e 74 20 78 29 0d 7b |t htons(|int x).{|
|000001c0| 0d 09 2f 2a 20 57 65 6c | 63 6f 6d 65 20 74 6f 20 |../* Wel|come to |
|000001d0| 4d 61 63 69 6e 74 6f 73 | 68 20 2a 2f 0d 09 72 65 |Macintos|h */..re|
|000001e0| 74 75 72 6e 20 28 78 29 | 3b 0d 7d 0d 0d 69 6e 74 |turn (x)|;.}..int|
|000001f0| 20 6e 74 6f 68 73 28 69 | 6e 74 20 78 29 0d 7b 0d | ntohs(i|nt x).{.|
|00000200| 09 2f 2a 20 57 65 6c 63 | 6f 6d 65 20 74 6f 20 4d |./* Welc|ome to M|
|00000210| 61 63 69 6e 74 6f 73 68 | 20 2a 2f 0d 09 72 65 74 |acintosh| */..ret|
|00000220| 75 72 6e 20 28 78 29 3b | 0d 7d 0d 0d 0d 0d 2f 2a |urn (x);|.}..../*|
|00000230| 20 68 74 6f 6e 6c 2c 20 | 6e 74 6f 68 6c 0d 20 2a | htonl, |ntohl. *|
|00000240| 20 2d 20 63 6f 6e 76 65 | 72 74 20 6c 6f 6e 67 20 | - conve|rt long |
|00000250| 64 61 74 61 2d 74 79 70 | 65 73 20 66 72 6f 6d 20 |data-typ|es from |
|00000260| 68 6f 73 74 20 74 6f 20 | 6e 65 74 77 6f 72 6b 20 |host to |network |
|00000270| 62 79 74 65 20 6f 72 64 | 65 72 20 61 6e 64 20 76 |byte ord|er and v|
|00000280| 69 63 65 20 76 65 72 73 | 61 2e 0d 20 2a 2f 0d 0d |ice vers|a.. */..|
|00000290| 6c 6f 6e 67 20 68 74 6f | 6e 6c 28 6c 6f 6e 67 20 |long hto|nl(long |
|000002a0| 79 29 0d 7b 0d 09 72 65 | 74 75 72 6e 20 28 79 29 |y).{..re|turn (y)|
|000002b0| 3b 0d 7d 0d 0d 6c 6f 6e | 67 20 6e 74 6f 68 6c 28 |;.}..lon|g ntohl(|
|000002c0| 6c 6f 6e 67 20 79 29 0d | 7b 0d 09 72 65 74 75 72 |long y).|{..retur|
|000002d0| 6e 20 28 79 29 3b 0d 7d | 00 00 00 00 00 00 00 00 |n (y);.}|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000310| 74 09 6d 74 75 3b 09 09 | 09 09 2f 2a 20 66 6f 72 |t.mtu;..|../* for|
|00000320| 20 55 44 50 20 2a 2f 0d | 09 2f 2a 20 66 6c 61 67 | UDP */.|./* flag|
|00000330| 06 69 70 64 72 2e 63 69 | 02 00 00 00 50 61 72 74 |.ipdr.ci|....Part|
|00000340| 53 49 54 21 00 00 00 00 | 00 00 00 00 00 02 ab b1 |SIT!....|........|
|00000350| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 ab f8 9c 7e 00 00 | 00 00 00 00 01 9a 0d 09 |.....~..|........|
|00000380| 63 68 61 72 09 09 09 63 | 6f 6e 6e 65 63 74 65 64 |char...c|onnected|
|00000390| 3b 0d 09 63 68 61 72 09 | 09 09 68 61 73 44 61 74 |;..char.|..hasDat|
|000003a0| 61 3b 0d 09 63 68 61 72 | 09 09 09 62 6f 75 6e 64 |a;..char|...bound|
|000003b0| 3b 09 09 09 09 2f 2a 20 | 62 6f 6f 6c 65 61 6e 20 |;..../* |boolean |
|000003c0| 2a 2f 0d 7d 3b 0d 74 79 | 70 65 64 65 66 20 73 74 |*/.};.ty|pedef st|
|000003d0| 72 75 63 74 20 6d 61 63 | 5f 73 6f 63 6b 65 74 20 |ruct mac|_socket |
|000003e0| 6d 61 63 5f 73 6f 63 6b | 65 74 3b 0d 0d 23 64 65 |mac_sock|et;..#de|
|000003f0| 66 69 6e 65 20 73 6f 63 | 6b 61 64 64 72 20 73 6f |fine soc|kaddr so|
|00000400| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000420| 00 00 00 00 00 00 00 03 | 00 04 00 93 00 12 01 db |........|........|
|00000430| 02 71 00 93 00 12 01 db | 02 71 ab 56 e3 9b 00 00 |.q......|.q.V....|
|00000440| 00 9d 00 00 00 9d 00 00 | 00 00 01 00 00 00 00 04 |........|........|
|00000450| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00000460| 00 00 00 46 01 54 0a e8 | 13 d6 00 00 00 1c 00 46 |...F.T..|.......F|
|00000470| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00000480| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00000490| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|000004a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000004f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+